package com.messi.mall.product;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
import org.springframework.transaction.annotation.EnableTransactionManagement;



@EnableRedisHttpSession
//@EnableCaching //开启缓存  只需要使用注解就能完成缓存操作  通过统一的配置文件管理缓存com.messi.mall.product.config.MyCacheConfig
// @Cacheable：使用在方法上面，如果使用，则表示这一个方法结果将会被缓存，下一次查询，将直接使用缓存结果
@EnableFeignClients(basePackages = "com.messi.mall.product.feign")
@EnableDiscoveryClient
@MapperScan("com.messi.mall.product.dao")
@SpringBootApplication
public class MallProductApplication {

    public static void main(String[] args) {
        SpringApplication.run(MallProductApplication.class, args);
    }

}
